/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package models;

import java.util.Set;
import play.db.jpa.*;
import javax.persistence.*;

/**
 *
 * @author Zlobniy
 */
@Entity
@Table(name="activities")
public class Activities extends Model{
    
    @ManyToMany(cascade= CascadeType.PERSIST)
    private Set<Company> companyList;
    
    @OneToMany(cascade= CascadeType.PERSIST)
    private Set<ActivitiesSubtype> subtypes;
    
    private String name;
    private String info;
    
    public Activities(String name, String info){
        this.name = name;
        this.info = info;
    }

    public Set<Company> getCompanyList() {
        return companyList;
    }

    public void setCompanyList(Set<Company> companyList) {
        this.companyList = companyList;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Set<ActivitiesSubtype> getSubtypes() {
        return subtypes;
    }

    public void setSubtypes(Set<ActivitiesSubtype> subtypes) {
        this.subtypes = subtypes;
    }
    
}
